const mongoose = require('mongoose');
let prodSchema = new mongoose.Schema({
    name:String,
    tel:String,
    password:String,
    lastLogin:String
});
let Prod = mongoose.model('prod', prodSchema);
module.exports = {
    add(prod){
        return Prod.create(prod);
    },
    delete(prod){
        return Prod.remove(prod);
    },
    find(prod){
        return Prod.find(prod);
    },
    update(prod,val){
        return Prod.update(prod,val);
    }
};